//package com.mapreduce;
//
//import lombok.AllArgsConstructor;
//import lombok.Data;
//import lombok.NoArgsConstructor;
//import org.apache.hadoop.io.WritableComparable;
//
//import java.io.DataInput;
//import java.io.DataOutput;
//import java.io.IOException;
//@Data
//@AllArgsConstructor
//@NoArgsConstructor
//public class YearTmp implements WritableComparable<YearTmp> {
//    private String year;
//    private double temp;
//    @Override
//    public int compareTo(YearTmp o) {
//        int n=this.year.compareTo(o.getYear());
//        if(n==0){
//            return (int) (this.getTemp()-o.getTemp());
//        }
//        return -n;
//    }
//
//    @Override
//    public void write(DataOutput out) throws IOException {
//        out.writeUTF(year);
//        out.writeDouble(temp);
//    }
//
//    @Override
//    public void readFields(DataInput in) throws IOException {
//        this.year=in.readUTF();
//        this.temp=in.readDouble();
//    }
//}
